//
//  ShareViewController.m
//  Camera
//
//  Created by aven wu on 2018/12/1.
//  Copyright © 2018年 gml. All rights reserved.
//

#import "ShareViewController.h"
#import "YCShareView.h"
#import "YCWXApiUtils.h"

@interface ShareViewController ()

@end

@implementation ShareViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    [btn setTitle:@"点击" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside];
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [self.view addSubview:btn];
}

- (void)btnAction
{
    YCShareView *shareView = [[YCShareView alloc] initWithShareHeadOprationWith:@[@"微信",@"朋友圈"] andImageArry:@[@"share_weixin_chat",@"share_weixin_timeline"] shareTypeArr:@[@(YCShareViewTypeWeChatSession),@(YCShareViewTypeWeChatTimeLine)]];
    shareView.shareBtnClick = ^(YCShareViewType shareType) {
        if (shareType == YCShareViewTypeWeChatSession) {
           
        }else if (shareType == YCShareViewTypeWeChatTimeLine){
           
        }
    };
    [[UIApplication sharedApplication].keyWindow addSubview:shareView];
}

@end
